﻿package flow {
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	
	public class UnitTime extends MovieClip {
		private function get tf():TextField { return _tf; }
		
		public function UnitTime() {
			this.buttonMode = true;
			this.addEventListener(MouseEvent.CLICK, this_click);
		}
		
		private var unit:int = 1;
		private function this_click(e:MouseEvent){
			this.unit++;
			if(unit == 4) unit = 1;
			switch(unit){
				case 1: this.tf.text = "Year"; break;
				case 2: this.tf.text = "Month"; break;
				case 3: this.tf.text = "Day"; break;
			}
		}
	}
}
